package com.neulogistics.contrib.procuredcenter.api.application.converter;

import com.neulogistics.contrib.procuredcenter.api.application.viewmodel.GoodsListViewModel;
import com.neulogistics.contrib.procuredcenter.infrastructure.persistence.orm.po.GoodsListPO;
import org.springframework.beans.BeanUtils;

public class GoodsListPOVMConverter {
    public static GoodsListViewModel POToVM(GoodsListPO goodsListPO){
        if (goodsListPO == null)
            return null;

        GoodsListViewModel goodsListViewModel = new GoodsListViewModel();
        BeanUtils.copyProperties(goodsListPO, goodsListViewModel);

        return goodsListViewModel;
    }
}
